3.148 \(\int \frac{x^2 (a+b \tanh ^{-1}(c x))}{d+e x} \, dx\)

Optimal. Leaf size=214 \[ \frac{b d^2 \text{PolyLog}\left (2,1-\frac{2}{c x+1}\right )}{2 e^3}-\frac{b d^2 \text{PolyLog}\left (2,1-\frac{2 c (d+e x)}{(c x+1) (c d+e)}\right )}{2 e^3}-\frac{d^2 \log \left (\frac{2}{c x+1}\right ) \left (a+b \tanh ^{-1}(c x)\right )}{e^3}+\frac{d^2 \left (a+b \tanh ^{-1}(c x)\right ) \log \left (\frac{2 c (d+e x)}{(c x+1) (c d+e)}\right )}{e^3}+\frac{x^2 \left (a+b \tanh ^{-1}(c x)\right )}{2 e}-\frac{a d x}{e^2}-\frac{b d \log \left (1-c^2 x^2\right )}{2 c e^2}-\frac{b \tanh ^{-1}(c x)}{2 c^2 e}-\frac{b d x \tanh ^{-1}(c x)}{e^2}+\frac{b x}{2 c e} \]

[Out]

-((a*d*x)/e^2) + (b*x)/(2*c*e) - (b*ArcTanh[c*x])/(2*c^2*e) - (b*d*x*ArcTanh[c*x])/e^2 + (x^2*(a + b*ArcTanh[c
*x]))/(2*e) - (d^2*(a + b*ArcTanh[c*x])*Log[2/(1 + c*x)])/e^3 + (d^2*(a + b*ArcTanh[c*x])*Log[(2*c*(d + e*x))/
((c*d + e)*(1 + c*x))])/e^3 - (b*d*Log[1 - c^2*x^2])/(2*c*e^2) + (b*d^2*PolyLog[2, 1 - 2/(1 + c*x)])/(2*e^3) -
 (b*d^2*PolyLog[2, 1 - (2*c*(d + e*x))/((c*d + e)*(1 + c*x))])/(2*e^3)

________________________________________________________________________________________

Rubi [A]  time = 0.199672, antiderivative size = 214, normalized size of antiderivative = 1., number of steps used = 12, number of rules used = 10, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.526, Rules used = {5940, 5910, 260, 5916, 321, 206, 5920, 2402, 2315, 2447} \[ \frac{b d^2 \text{PolyLog}\left (2,1-\frac{2}{c x+1}\right )}{2 e^3}-\frac{b d^2 \text{PolyLog}\left (2,1-\frac{2 c (d+e x)}{(c x+1) (c d+e)}\right )}{2 e^3}-\frac{d^2 \log \left (\frac{2}{c x+1}\right ) \left (a+b \tanh ^{-1}(c x)\right )}{e^3}+\frac{d^2 \left (a+b \tanh ^{-1}(c x)\right ) \log \left (\frac{2 c (d+e x)}{(c x+1) (c d+e)}\right )}{e^3}+\frac{x^2 \left (a+b \tanh ^{-1}(c x)\right )}{2 e}-\frac{a d x}{e^2}-\frac{b d \log \left (1-c^2 x^2\right )}{2 c e^2}-\frac{b \tanh ^{-1}(c x)}{2 c^2 e}-\frac{b d x \tanh ^{-1}(c x)}{e^2}+\frac{b x}{2 c e} \]

Antiderivative was successfully verified.

[In]

Int[(x^2*(a + b*ArcTanh[c*x]))/(d + e*x),x]

[Out]

-((a*d*x)/e^2) + (b*x)/(2*c*e) - (b*ArcTanh[c*x])/(2*c^2*e) - (b*d*x*ArcTanh[c*x])/e^2 + (x^2*(a + b*ArcTanh[c
*x]))/(2*e) - (d^2*(a + b*ArcTanh[c*x])*Log[2/(1 + c*x)])/e^3 + (d^2*(a + b*ArcTanh[c*x])*Log[(2*c*(d + e*x))/
((c*d + e)*(1 + c*x))])/e^3 - (b*d*Log[1 - c^2*x^2])/(2*c*e^2) + (b*d^2*PolyLog[2, 1 - 2/(1 + c*x)])/(2*e^3) -
 (b*d^2*PolyLog[2, 1 - (2*c*(d + e*x))/((c*d + e)*(1 + c*x))])/(2*e^3)

Rule 5940

Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_.)*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_))^(q_.), x_Symbol] :> Int[E
xpandIntegrand[(a + b*ArcTanh[c*x])^p, (f*x)^m*(d + e*x)^q, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[
p, 0] && IntegerQ[q] && (GtQ[q, 0] || NeQ[a, 0] || IntegerQ[m])

Rule 5910

Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_.), x_Symbol] :> Simp[x*(a + b*ArcTanh[c*x])^p, x] - Dist[b*c*p, In
t[(x*(a + b*ArcTanh[c*x])^(p - 1))/(1 - c^2*x^2), x], x] /; FreeQ[{a, b, c}, x] && IGtQ[p, 0]

Rule 260

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rule 5916

Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_.)*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*ArcT
anh[c*x])^p)/(d*(m + 1)), x] - Dist[(b*c*p)/(d*(m + 1)), Int[((d*x)^(m + 1)*(a + b*ArcTanh[c*x])^(p - 1))/(1 -
 c^2*x^2), x], x] /; FreeQ[{a, b, c, d, m}, x] && IGtQ[p, 0] && (EqQ[p, 1] || IntegerQ[m]) && NeQ[m, -1]

Rule 321

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(c^(n - 1)*(c*x)^(m - n + 1)*(a + b*x^n
)^(p + 1))/(b*(m + n*p + 1)), x] - Dist[(a*c^n*(m - n + 1))/(b*(m + n*p + 1)), Int[(c*x)^(m - n)*(a + b*x^n)^p
, x], x] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0] && GtQ[m, n - 1] && NeQ[m + n*p + 1, 0] && IntBinomialQ[a, b,
 c, n, m, p, x]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 5920

Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))/((d_) + (e_.)*(x_)), x_Symbol] :> -Simp[((a + b*ArcTanh[c*x])*Log[2/(1
 + c*x)])/e, x] + (Dist[(b*c)/e, Int[Log[2/(1 + c*x)]/(1 - c^2*x^2), x], x] - Dist[(b*c)/e, Int[Log[(2*c*(d +
e*x))/((c*d + e)*(1 + c*x))]/(1 - c^2*x^2), x], x] + Simp[((a + b*ArcTanh[c*x])*Log[(2*c*(d + e*x))/((c*d + e)
*(1 + c*x))])/e, x]) /; FreeQ[{a, b, c, d, e}, x] && NeQ[c^2*d^2 - e^2, 0]

Rule 2402

Int[Log[(c_.)/((d_) + (e_.)*(x_))]/((f_) + (g_.)*(x_)^2), x_Symbol] :> -Dist[e/g, Subst[Int[Log[2*d*x]/(1 - 2*
d*x), x], x, 1/(d + e*x)], x] /; FreeQ[{c, d, e, f, g}, x] && EqQ[c, 2*d] && EqQ[e^2*f + d^2*g, 0]

Rule 2315

Int[Log[(c_.)*(x_)]/((d_) + (e_.)*(x_)), x_Symbol] :> -Simp[PolyLog[2, 1 - c*x]/e, x] /; FreeQ[{c, d, e}, x] &
& EqQ[e + c*d, 0]

Rule 2447

Int[Log[u_]*(Pq_)^(m_.), x_Symbol] :> With[{C = FullSimplify[(Pq^m*(1 - u))/D[u, x]]}, Simp[C*PolyLog[2, 1 - u
], x] /; FreeQ[C, x]] /; IntegerQ[m] && PolyQ[Pq, x] && RationalFunctionQ[u, x] && LeQ[RationalFunctionExponen
ts[u, x][[2]], Expon[Pq, x]]

Rubi steps

\begin{align*} \int \frac{x^2 \left (a+b \tanh ^{-1}(c x)\right )}{d+e x} \, dx &=\int \left (-\frac{d \left (a+b \tanh ^{-1}(c x)\right )}{e^2}+\frac{x \left (a+b \tanh ^{-1}(c x)\right )}{e}+\frac{d^2 \left (a+b \tanh ^{-1}(c x)\right )}{e^2 (d+e x)}\right ) \, dx\\ &=-\frac{d \int \left (a+b \tanh ^{-1}(c x)\right ) \, dx}{e^2}+\frac{d^2 \int \frac{a+b \tanh ^{-1}(c x)}{d+e x} \, dx}{e^2}+\frac{\int x \left (a+b \tanh ^{-1}(c x)\right ) \, dx}{e}\\ &=-\frac{a d x}{e^2}+\frac{x^2 \left (a+b \tanh ^{-1}(c x)\right )}{2 e}-\frac{d^2 \left (a+b \tanh ^{-1}(c x)\right ) \log \left (\frac{2}{1+c x}\right )}{e^3}+\frac{d^2 \left (a+b \tanh ^{-1}(c x)\right ) \log \left (\frac{2 c (d+e x)}{(c d+e) (1+c x)}\right )}{e^3}+\frac{\left (b c d^2\right ) \int \frac{\log \left (\frac{2}{1+c x}\right )}{1-c^2 x^2} \, dx}{e^3}-\frac{\left (b c d^2\right ) \int \frac{\log \left (\frac{2 c (d+e x)}{(c d+e) (1+c x)}\right )}{1-c^2 x^2} \, dx}{e^3}-\frac{(b d) \int \tanh ^{-1}(c x) \, dx}{e^2}-\frac{(b c) \int \frac{x^2}{1-c^2 x^2} \, dx}{2 e}\\ &=-\frac{a d x}{e^2}+\frac{b x}{2 c e}-\frac{b d x \tanh ^{-1}(c x)}{e^2}+\frac{x^2 \left (a+b \tanh ^{-1}(c x)\right )}{2 e}-\frac{d^2 \left (a+b \tanh ^{-1}(c x)\right ) \log \left (\frac{2}{1+c x}\right )}{e^3}+\frac{d^2 \left (a+b \tanh ^{-1}(c x)\right ) \log \left (\frac{2 c (d+e x)}{(c d+e) (1+c x)}\right )}{e^3}-\frac{b d^2 \text{Li}_2\left (1-\frac{2 c (d+e x)}{(c d+e) (1+c x)}\right )}{2 e^3}+\frac{\left (b d^2\right ) \operatorname{Subst}\left (\int \frac{\log (2 x)}{1-2 x} \, dx,x,\frac{1}{1+c x}\right )}{e^3}+\frac{(b c d) \int \frac{x}{1-c^2 x^2} \, dx}{e^2}-\frac{b \int \frac{1}{1-c^2 x^2} \, dx}{2 c e}\\ &=-\frac{a d x}{e^2}+\frac{b x}{2 c e}-\frac{b \tanh ^{-1}(c x)}{2 c^2 e}-\frac{b d x \tanh ^{-1}(c x)}{e^2}+\frac{x^2 \left (a+b \tanh ^{-1}(c x)\right )}{2 e}-\frac{d^2 \left (a+b \tanh ^{-1}(c x)\right ) \log \left (\frac{2}{1+c x}\right )}{e^3}+\frac{d^2 \left (a+b \tanh ^{-1}(c x)\right ) \log \left (\frac{2 c (d+e x)}{(c d+e) (1+c x)}\right )}{e^3}-\frac{b d \log \left (1-c^2 x^2\right )}{2 c e^2}+\frac{b d^2 \text{Li}_2\left (1-\frac{2}{1+c x}\right )}{2 e^3}-\frac{b d^2 \text{Li}_2\left (1-\frac{2 c (d+e x)}{(c d+e) (1+c x)}\right )}{2 e^3}\\ \end{align*}

Mathematica [C]  time = 3.08483, size = 394, normalized size = 1.84 \[ \frac{-b d^2 \text{PolyLog}\left (2,e^{-2 \left (\tanh ^{-1}\left (\frac{c d}{e}\right )+\tanh ^{-1}(c x)\right )}\right )+b d^2 \text{PolyLog}\left (2,-e^{-2 \tanh ^{-1}(c x)}\right )+2 a d^2 \log (d+e x)-2 a d e x+a e^2 x^2-\frac{b d e \sqrt{1-\frac{c^2 d^2}{e^2}} \tanh ^{-1}(c x)^2 e^{-\tanh ^{-1}\left (\frac{c d}{e}\right )}}{c}-\frac{1}{2} i \pi b d^2 \log \left (1-c^2 x^2\right )-\frac{b d e \log \left (1-c^2 x^2\right )}{c}-\frac{b e^2 \tanh ^{-1}(c x)}{c^2}+2 b d^2 \tanh ^{-1}(c x) \tanh ^{-1}\left (\frac{c d}{e}\right )+2 b d^2 \tanh ^{-1}\left (\frac{c d}{e}\right ) \log \left (1-e^{-2 \left (\tanh ^{-1}\left (\frac{c d}{e}\right )+\tanh ^{-1}(c x)\right )}\right )+2 b d^2 \tanh ^{-1}(c x) \log \left (1-e^{-2 \left (\tanh ^{-1}\left (\frac{c d}{e}\right )+\tanh ^{-1}(c x)\right )}\right )-2 b d^2 \tanh ^{-1}\left (\frac{c d}{e}\right ) \log \left (i \sinh \left (\tanh ^{-1}\left (\frac{c d}{e}\right )+\tanh ^{-1}(c x)\right )\right )-b d^2 \tanh ^{-1}(c x)^2+i \pi b d^2 \tanh ^{-1}(c x)-2 b d^2 \tanh ^{-1}(c x) \log \left (e^{-2 \tanh ^{-1}(c x)}+1\right )-i \pi b d^2 \log \left (e^{2 \tanh ^{-1}(c x)}+1\right )+\frac{b d e \tanh ^{-1}(c x)^2}{c}-2 b d e x \tanh ^{-1}(c x)+b e^2 x^2 \tanh ^{-1}(c x)+\frac{b e^2 x}{c}}{2 e^3} \]

Warning: Unable to verify antiderivative.

[In]

Integrate[(x^2*(a + b*ArcTanh[c*x]))/(d + e*x),x]

[Out]

(-2*a*d*e*x + (b*e^2*x)/c + a*e^2*x^2 - (b*e^2*ArcTanh[c*x])/c^2 + I*b*d^2*Pi*ArcTanh[c*x] - 2*b*d*e*x*ArcTanh
[c*x] + b*e^2*x^2*ArcTanh[c*x] + 2*b*d^2*ArcTanh[(c*d)/e]*ArcTanh[c*x] - b*d^2*ArcTanh[c*x]^2 + (b*d*e*ArcTanh
[c*x]^2)/c - (b*d*Sqrt[1 - (c^2*d^2)/e^2]*e*ArcTanh[c*x]^2)/(c*E^ArcTanh[(c*d)/e]) - 2*b*d^2*ArcTanh[c*x]*Log[
1 + E^(-2*ArcTanh[c*x])] - I*b*d^2*Pi*Log[1 + E^(2*ArcTanh[c*x])] + 2*b*d^2*ArcTanh[(c*d)/e]*Log[1 - E^(-2*(Ar
cTanh[(c*d)/e] + ArcTanh[c*x]))] + 2*b*d^2*ArcTanh[c*x]*Log[1 - E^(-2*(ArcTanh[(c*d)/e] + ArcTanh[c*x]))] + 2*
a*d^2*Log[d + e*x] - (b*d*e*Log[1 - c^2*x^2])/c - (I/2)*b*d^2*Pi*Log[1 - c^2*x^2] - 2*b*d^2*ArcTanh[(c*d)/e]*L
og[I*Sinh[ArcTanh[(c*d)/e] + ArcTanh[c*x]]] + b*d^2*PolyLog[2, -E^(-2*ArcTanh[c*x])] - b*d^2*PolyLog[2, E^(-2*
(ArcTanh[(c*d)/e] + ArcTanh[c*x]))])/(2*e^3)

________________________________________________________________________________________

Maple [A]  time = 0.115, size = 298, normalized size = 1.4 \begin{align*}{\frac{a{x}^{2}}{2\,e}}-{\frac{adx}{{e}^{2}}}+{\frac{a{d}^{2}\ln \left ( cxe+cd \right ) }{{e}^{3}}}+{\frac{b{\it Artanh} \left ( cx \right ){x}^{2}}{2\,e}}-{\frac{bdx{\it Artanh} \left ( cx \right ) }{{e}^{2}}}+{\frac{b{\it Artanh} \left ( cx \right ){d}^{2}\ln \left ( cxe+cd \right ) }{{e}^{3}}}+{\frac{bx}{2\,ce}}+{\frac{bd}{2\,c{e}^{2}}}-{\frac{b\ln \left ( cxe+e \right ) d}{2\,c{e}^{2}}}-{\frac{b\ln \left ( cxe+e \right ) }{4\,{c}^{2}e}}-{\frac{b\ln \left ( cxe-e \right ) d}{2\,c{e}^{2}}}+{\frac{b\ln \left ( cxe-e \right ) }{4\,{c}^{2}e}}-{\frac{b{d}^{2}\ln \left ( cxe+cd \right ) }{2\,{e}^{3}}\ln \left ({\frac{cxe+e}{-cd+e}} \right ) }-{\frac{b{d}^{2}}{2\,{e}^{3}}{\it dilog} \left ({\frac{cxe+e}{-cd+e}} \right ) }+{\frac{b{d}^{2}\ln \left ( cxe+cd \right ) }{2\,{e}^{3}}\ln \left ({\frac{cxe-e}{-cd-e}} \right ) }+{\frac{b{d}^{2}}{2\,{e}^{3}}{\it dilog} \left ({\frac{cxe-e}{-cd-e}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*(a+b*arctanh(c*x))/(e*x+d),x)

[Out]

1/2*a/e*x^2-a*d*x/e^2+a*d^2/e^3*ln(c*e*x+c*d)+1/2*b*arctanh(c*x)/e*x^2-b*d*x*arctanh(c*x)/e^2+b*arctanh(c*x)*d
^2/e^3*ln(c*e*x+c*d)+1/2*b*x/c/e+1/2/c*b*d/e^2-1/2/c*b/e^2*ln(c*e*x+e)*d-1/4/c^2*b/e*ln(c*e*x+e)-1/2/c*b/e^2*l
n(c*e*x-e)*d+1/4/c^2*b/e*ln(c*e*x-e)-1/2*b/e^3*d^2*ln(c*e*x+c*d)*ln((c*e*x+e)/(-c*d+e))-1/2*b/e^3*d^2*dilog((c
*e*x+e)/(-c*d+e))+1/2*b/e^3*d^2*ln(c*e*x+c*d)*ln((c*e*x-e)/(-c*d-e))+1/2*b/e^3*d^2*dilog((c*e*x-e)/(-c*d-e))

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \frac{1}{2} \, a{\left (\frac{2 \, d^{2} \log \left (e x + d\right )}{e^{3}} + \frac{e x^{2} - 2 \, d x}{e^{2}}\right )} + \frac{1}{2} \, b \int \frac{x^{2}{\left (\log \left (c x + 1\right ) - \log \left (-c x + 1\right )\right )}}{e x + d}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(a+b*arctanh(c*x))/(e*x+d),x, algorithm="maxima")

[Out]

1/2*a*(2*d^2*log(e*x + d)/e^3 + (e*x^2 - 2*d*x)/e^2) + 1/2*b*integrate(x^2*(log(c*x + 1) - log(-c*x + 1))/(e*x
 + d), x)

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{b x^{2} \operatorname{artanh}\left (c x\right ) + a x^{2}}{e x + d}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(a+b*arctanh(c*x))/(e*x+d),x, algorithm="fricas")

[Out]

integral((b*x^2*arctanh(c*x) + a*x^2)/(e*x + d), x)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{x^{2} \left (a + b \operatorname{atanh}{\left (c x \right )}\right )}{d + e x}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**2*(a+b*atanh(c*x))/(e*x+d),x)

[Out]

Integral(x**2*(a + b*atanh(c*x))/(d + e*x), x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (b \operatorname{artanh}\left (c x\right ) + a\right )} x^{2}}{e x + d}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(a+b*arctanh(c*x))/(e*x+d),x, algorithm="giac")

[Out]

integrate((b*arctanh(c*x) + a)*x^2/(e*x + d), x)